from random import randint

def func1(x):
    return x % 2

if __name__ == '__main__':
    alist = [randint(1, 100) for i in range(10)]
    print('alist:', alist)
    result = filter(func1, alist)
    print('result:', result)
    print('list result:', list(result))
    result2 = filter(lambda x: x % 2, alist)
    print('result2:', result2)
    print('list result2:', list(result2))